package suites.stub {
	import org.splink.deepsplink.interceptor.IInterceptor;

	/**
	 * @author Max Kugland
	 */
	public class InterceptorStub implements IInterceptor {
		private var _fnc : Function;
		private var _lastId : String;

		public function InterceptorStub(fnc : Function) {
			_fnc = fnc != null ? fnc : function(pageId : String, pageParams : Array):void {
			};
		}

		public function intercept(id : String, pageParams : Array) : Boolean {
			_lastId = id;
			return _fnc(id, pageParams);
		}

		public function get lastInterceptedId() : String {
			return _lastId;
		}
	}
}
